<?php

namespace Addons\IntegralShop\Model;

use Think\Model;

class IsUserModel extends Model
{
    public function getByOpenid($openId, $field = "*")
    {
        return $this->field($field)->where(['openid' => $openId])->find();
    }

    public function reduceMark($openId, $mark, $currentMark)
    {
        return $this->where(['openid' => $openId, 'mark' => $currentMark])->setField("mark", $mark);
    }
}
